package com.cloud.bean;

public class BeanPro extends Bean implements Cloneable{
    public BeanPro(Integer num, String s, Object[] elements) {
        super(num, s, elements);
    }

    public BeanPro clone() throws CloneNotSupportedException{
        BeanPro result = (BeanPro) super.clone();
        result.elements = elements.clone();
        return result;
    }

    public static void main(String[] args) throws CloneNotSupportedException{
        BeanPro bean = new BeanPro(1, "shuchuanbiao", new Object[2]);
        BeanPro beanClone = bean.clone();
        System.out.println(beanClone.getClass().getName());
        System.out.println(bean.getElements() == beanClone.getElements());
    }
}
